using EventBusDemo.Api.Applications.Orders;
using Microsoft.AspNetCore.Mvc;

namespace EventBusDemo.Api.Controllers;

[ApiController]
[Route("[controller]")]
public class OrderController : ControllerBase
{
    private readonly OrderAppService _orderAppService;

    public OrderController(OrderAppService orderAppService)
    {
        _orderAppService = orderAppService;
    }

    [HttpPost]
    public async Task<Guid> CreateOrder(string name) => await _orderAppService.CreateOrder(name);
}